[runtime] Filter resumed currentProcessingKeys by subtask ownership a…#581
Open
joeyutong wants to merge 1 commit intoapache:mainfrom
Open
[runtime] Filter resumed currentProcessingKeys by subtask ownership a…#581joeyutong wants to merge 1 commit intoapache:mainfrom
joeyutong wants to merge 1 commit intoapache:mainfrom
Conversation
Collaborator
|
Thanks for you work @joeyutong, LGTM. Could you take a look at your convenience? In pr #80, it was discussed that keys outside the key range need to be filtered out after rescaling. However, it appears that it was not implemented at the time.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…fter rescaling
Purpose of change
ActionExecutionOperatorpersistscurrentProcessingKeysOpStateas union operator state so all subtasks can see in-flight keys after restore/rescaling. However,tryResumeProcessActionTasks()resumed every restored key without checking whether the key belonged to the current subtask.That behavior is incorrect after scale-out: multiple subtasks can receive the same union state entry, so non-owner subtasks may also enqueue resume work for keys they do not own. This can lead to duplicated processing after recovery.
This change fixes the restore path by filtering
currentProcessingKeysOpStatewith subtask ownership before resubmitting work:The ownership check is encapsulated in
isKeyOwnedByCurrentSubtask(...)inActionExecutionOperator.java.Tests
Added an operator-level restore/rescaling regression test in
ActionExecutionOperatorTest.java:Documentation
doc-neededdoc-not-neededdoc-included